package com.ebt.m.proposal_v2.dao.response;

import android.graphics.drawable.BitmapDrawable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Rick.Wang on 2017/10/25.
 */

public class BusinessConfig {

    public int proposal_maxInsured;
    public int proposal_minInsured;
    public int proposal_supportMultipleInsured;
    public ProposalOtherInsured proposal_other_insured;

    public BusinessConfig(){

    }

    public BusinessConfig(BusinessConfig businessConfig){
        this.proposal_maxInsured = businessConfig.proposal_maxInsured;
        this.proposal_minInsured = businessConfig.proposal_minInsured;
        this.proposal_supportMultipleInsured = businessConfig.proposal_supportMultipleInsured;
        if (businessConfig.proposal_other_insured != null){
            this.proposal_other_insured = new ProposalOtherInsured(businessConfig.proposal_other_insured);
        }
    }

    public static class ProposalOtherInsured {

        public ProposalOtherInsured(){

        }

        public ProposalOtherInsured(ProposalOtherInsured insured){
            if (insured.relation != null) {
                this.relation = new Relation(insured.relation);
            }
            if (insured.age != null){
                this.age = new Age(insured.age);
            }
            if (insured.profession != null){
                this.profession = new Profession(insured.profession);
            }
            if (insured.sex != null){
                this.sex = new Sex(insured.sex);
            }
        }

        public Relation relation;
        public Age age;
        public Sex sex;
        public Profession profession;

        public static class Relation {
            public List<Integer> list;
            public int defaultValue;

            public Relation(){
            }

            public Relation(Relation org){
                this.defaultValue = org.defaultValue;
                this.list = new ArrayList<Integer>();
                if (org.list == null){
                    return;
                }
                for (Integer integer : org.list){
                    this.list.add(integer);
                }
            }
        }

        public static class Age {
            public List<String> range;
            public String defaultValue;

            public Age(){
            }

            public Age(Age org){
                this.defaultValue = org.defaultValue;
                this.range = new ArrayList<String>();
                if (org.range == null){
                    return;
                }
                for (String string : org.range){
                    this.range.add(string);
                }
            }
        }

        public static class Sex {
            public List<Integer> list;
            public int defaultValue;

            public Sex(){
            }

            public Sex(Sex org){
                this.defaultValue = org.defaultValue;
                this.list = new ArrayList<Integer>();
                if (org.list == null){
                    return;
                }
                for (Integer integer : org.list){
                    this.list.add(integer);
                }
            }
        }

        public static class Profession {
            public List<Integer> list;
            public int defaultValue;
            public Profession(){
            }

            public Profession(Profession org){
                this.defaultValue = org.defaultValue;
                this.list = new ArrayList<Integer>();
                if (org.list == null){
                    return;
                }
                for (Integer integer : org.list){
                    this.list.add(integer);
                }
            }
        }
    }
}